import Vue from "vue";
import VueRouter, { RouteConfig } from "vue-router";

Vue.use(VueRouter);

const routes: Array<RouteConfig> = [
  {
    path: "/",
    redirect: "/complex"
  },
  {
    path: "/first",
    name: "first",
    component: () => import("@/views/first/index.vue")
  },
  {
    path: "/third",
    name: "third",
    component: () => import("@/views/third/index.vue")
  },
  {
    path: "/triangle",
    name: "triangle",
    component: () => import("@/views/triangle/index.vue")
  },
  {
    path: "/complex",
    name: "complex",
    component: () => import("@/views/complex/index.vue")
  }
];

const router = new VueRouter({
  routes
});

export default router;
